import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const useUserStore = defineStore('user', () => {
    // state 状态数据
    const name = ref('tom')
    const age = ref(18)

    // getters 计算属性

    // actions 方法
    function grow(){
        age.value++
    }

  return { name, age, grow }
})
